<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('打印请假记录')" />
</head>
<body class="white-bg">
<div class="btn-group-sm hidden-xs" style="margin-left: 20px" id="toolbar" role="group">
    <a class="btn btn-success" onclick="PreviewMytable()">
        <i class="fa fa-print"></i> 打印
    </a>
</div>
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-leave-print">
        <input type="hidden" id="title">
        <div class="form-group">
            <label class="col-sm-3 control-label">请假人：</label>
            <div class="form-control-static" th:text="${recordLeave.userName}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">人员类型：</label>
            <div class="form-control-static" th:text="${@dict.getLabel('record_user_type', recordLeave.userType)}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">代理人：</label>
            <div class="form-control-static" th:text="${recordLeave.agentUser}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">休假类型：</label>
            <div class="form-control-static" th:text="${@dict.getLabel('record_leave_type', recordLeave.leaveType)}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">请假事由：</label>
            <div class="form-control-static" th:text="${recordLeave.leaveContent}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">开始时间：</label>
            <div class="form-control-static" th:text="${#dates.format(recordLeave.startTime, 'yyyy-MM-dd')}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">结束时间：</label>
            <div class="form-control-static" th:text="${#dates.format(recordLeave.endTime, 'yyyy-MM-dd')}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">天数：</label>
            <div class="form-control-static" th:text="${recordLeave.days}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">备注：</label>
            <div class="form-control-static" th:text="${recordLeave.remark}">
            </div>
        </div>
    </form>
</div>
<div id="print_content" style="display:none">
    <table width="100%" border=1 cellSpacing=0 cellPadding=1 style="border-collapse:collapse" bordercolor="#333333">
        <tr class="z1">
            <td>姓名</td>
            <td>[[${recordLeave.userName}]]</td>
            <td>身份证号</td>
            <td>[[${recordLeave.createBy}]]</td>
        </tr>
        <tr class="z1">
            <td>科室</td>
            <td>[[${deptName}]]</td>
            <td>职务</td>
            <td>[[${recordLeave.dutyName}]]</td>
        </tr>
        <tr class="z1">
            <td>指定职务代理人</td>
            <td>[[${recordLeave.agentUser}]]</td>
            <td>休假类型</td>
            <td>[[${@dict.getLabel('record_leave_type', recordLeave.leaveType)}]]</td>
        </tr>
        <tr class="z1">
            <td>请假事由</td>
            <td colspan="3">[[${recordLeave.leaveContent}]]</td>
        </tr>
        <tr class="z1">
            <td>休假日期</td>
            <td colspan="2">[[${#dates.format(recordLeave.startTime, 'yyyy-MM-dd')}]]至[[${#dates.format(recordLeave.endTime, 'yyyy-MM-dd')}]]</td>
            <td>共[[${recordLeave.days}]]天</td>
        </tr>
        <tr class="z1">
            <td>科室意见</td>
            <td colspan="2"></td>
            <td>科室负责人签字：</td>
        </tr>
        <tr class="z1">
            <td>主管科室意见</td>
            <td colspan="2"></td>
            <td>主管科室负责人签字：</td>
        </tr>
        <tr class="z1">
            <td>人事科意见</td>
            <td colspan="2"></td>
            <td>人事科负责人签字：</td>
        </tr>
        <tr class="z1">
            <td>分管领导意见</td>
            <td colspan="2"></td>
            <td>分管领导签字：</td>
        </tr>
        <tr class="z1">
            <td>院长意见</td>
            <td colspan="2"></td>
            <td>院长签字：</td>
        </tr>
        <tr class="z1">
            <td>党委书记意见</td>
            <td colspan="2"></td>
            <td>党委书记签字：</td>
        </tr>
    </table>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: lodop-js" />
<script th:inline="javascript">
    var LODOP; //声明为全局变量
    function PreviewMytable() {
        LODOP = getLodop();

        LODOP.PRINT_INITA(0,0,522,333,"");
        LODOP.SET_PRINT_PAGESIZE(0,0,0,"A4");
        var strStyle="<style> .z1{font-size:13px;height: 25px;}.z2{font-size:12px}td,th {border-width: 1px;border-style: solid;border-collapse: collapse}.wk{border-bottom:1px solid #fff;border-left: 1px solid #fff;border-right: 1px solid #fff;} </style>"
        LODOP.ADD_PRINT_TEXT("10mm","35mm","70mm","12mm","中层及以上干部请假审批表");
        LODOP.SET_PRINT_STYLEA(0,"FontSize",15);
        LODOP.SET_PRINT_STYLEA(0,"Bold",1);
        LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
        LODOP.SET_PRINT_STYLEA(0,"Horient",3);
        LODOP.ADD_PRINT_TABLE("20mm","10mm","90%","30%",strStyle+document.getElementById("print_content").innerHTML);
        LODOP.SET_PRINT_STYLEA(0,"Offset2Top",-60);
        LODOP.ADD_PRINT_TEXT("100mm","10mm","90%",0,"注：休假及出差进修培训等不在岗情况均需填写，本表一式两份，由人事科及所在科室分别留存");

        LODOP.ADD_PRINT_TEXT("120mm","35mm","70mm","12mm","中层及以上干部请假审批表");
        LODOP.SET_PRINT_STYLEA(0,"FontSize",15);
        LODOP.SET_PRINT_STYLEA(0,"Bold",1);
        LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
        LODOP.SET_PRINT_STYLEA(0,"Horient",3);
        LODOP.ADD_PRINT_TABLE("130mm","10mm","90%","30%",strStyle+document.getElementById("print_content").innerHTML);
        LODOP.SET_PRINT_STYLEA(0,"Offset2Top",-60);
        LODOP.ADD_PRINT_TEXT("210mm","10mm","90%",0,"注：休假及出差进修培训等不在岗情况均需填写，本表一式两份，由人事科及所在科室分别留存");

        LODOP.PREVIEW();
    }
</script>
</body>
</html>